package com.example.glidestudy;

import android.content.Context;

import com.bumptech.glide.Glide;
import com.bumptech.glide.GlideBuilder;
import com.bumptech.glide.load.DecodeFormat;
import com.bumptech.glide.load.engine.cache.DiskLruCacheFactory;
import com.bumptech.glide.load.engine.cache.ExternalCacheDiskCacheFactory;
import com.bumptech.glide.load.engine.cache.InternalCacheDiskCacheFactory;
import com.bumptech.glide.module.GlideModule;

/**
 * Created by frc on 16-7-21.
 */
public class MyGlideModule implements GlideModule {
    @Override
    public void applyOptions(Context context, GlideBuilder builder) {
        builder.setDiskCache(new InternalCacheDiskCacheFactory(context,50));
        builder.setDiskCache(new ExternalCacheDiskCacheFactory(context,"",200));
        builder.setDecodeFormat(DecodeFormat.PREFER_ARGB_8888);



    }

    @Override
    public void registerComponents(Context context, Glide glide) {

    }
}
